from modbus_wrapper import ModbusMaster
import time


def run():
    DI = master.read_holding_registers(1, 32, 12)
    print(DI)
    DO = master.read_holding_registers(1, 28, 4)
    print(DO)
    time.sleep(1)

if __name__ == "__main__":
    master = ModbusMaster()
    while True:
        run()